﻿
module ClassTest

type Class1 =
    member this.x a = a + 1

// 语法上允许不初始化，也不绑定显式字段    
type Class2 = 
    val x: int
    val y: string

// 无主构造函数
type Class3 = 
    val x: int
    val y: string
    new(z) = {x = z; y = "abc"} // 像绑定一个记录

type Class4(z) as this = 
    let mutable y = 0;
    [<DefaultValue>] val mutable x: int
    do this.x <- 5
    do y <- 5
    new() = Class4(0)
    